package com.yyt.yytojbackenduserservice.controller.inner;

import com.yyt.yytojbackendcommon.annotation.AuthCheck;
import com.yyt.yytojbackendcommon.common.BaseResponse;
import com.yyt.yytojbackendcommon.common.ErrorCode;
import com.yyt.yytojbackendcommon.common.ResultUtils;
import com.yyt.yytojbackendcommon.constant.UserConstant;
import com.yyt.yytojbackendcommon.exception.BusinessException;
import com.yyt.yytojbackendcommon.exception.ThrowUtils;
import com.yyt.yytojbackendmodel.model.entity.User;
import com.yyt.yytojbackendserviceclient.service.UserFeignClient;
import com.yyt.yytojbackenduserservice.service.UserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;



/**
 * 用户接口
 *
 * @author yyt
*
 */
@RestController
@RequestMapping("/inner")
public class UserInnerController implements UserFeignClient {

    @Resource
    private UserService userService;

    @Override
    @GetMapping("/get/id")
    public User getById(long userId) {
        return userService.getById(userId);
    }

    @Override
    @GetMapping("/get/ids")
    public List<User> listByIds(Collection<? extends Serializable> idList) {
        return userService.listByIds(idList);
    }

}
